package edu.zut.vlog.mapper;

import edu.zut.vlog.pojo.Album;
import edu.zut.vlog.pojo.UserImg;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * Created by Intellij IDEA
 * Author: yi cheng
 * Date: 2022/5/10
 * Time: 20:01
 **/
@Mapper
public interface AlbumMapper {
    //查询所有人的所有相册
    List<Album> queryAllAlbum();

    List<Album> queryAlbumList();//只查询相册

    List<Album> queryAlbumAndUser();
    int countAllAlbum();
    int queryUserIdByAlbumId(Integer albumId);
    //查询个人相册
    //用户，照片一并封装
    List<Album> queryAlbumByUserId(Integer userId);

    //增加相册
    int addAlbum(String title, String imgDescribe,Integer userId,String coverImgUrl);

    //用户相册查询根据当前用户登录的id,仅仅查询相册封装
    List<Album> queryUserAlbumByUserId(Integer userId);

    //对相册内的图片进行查询
    List<UserImg> queryImgByAlbumId(Integer albumId);

}
